<div id="manajemen-sapi" class="span12">
	<div id="menambah-stok-sapi" class="row-fluid sortable ui-sortable">
		
		<form id="form_sapi" method="post" action="<?php echo base_url();?>sapi/tambah_sapi">
			<div class="box span12">
				<div class="box-header well" data-original-title>
					<h2>Menambahkan Stok Sapi</h2>
					<div class="box-icon">
						<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
						<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
					</div>
				</div>
				<div class="box-content">
					<table class="table">
						<tbody>
							<tr id="pilih-aksi">
								<td><label class="control-label">Pilih Aksi</label></td>
								<td>
									<div class="controls">
									  <label class="radio">
											<input type="radio" name="aksi" id="optionsRadios1" value="tambah" checked></input>
											Menambahkan Stok Sapi
									  </label>
									  <div style="clear:both"></div>
									  <label class="radio">
											<input type="radio" name="aksi" id="optionsRadios2" value="kurang"></input>
											Mengurangi Stok Sapi
									  </label>
									</div>
								</td>
							</tr>
							<tr>
								<td><label class="control-label">Jenis Sapi</label></td>
								<td>
									<div class="controls">
									  <select data-rel="chosen" name='jenis_sapi'>
									<?php
										foreach($jenis_sapi as $row){
											echo "<option value='".$row["id_sapi"]."'>".$row["nama"]."</option>";
										}
									?>
									  </select>
									</div>
								</td>
							</tr>
							<tr>
								<td><label class="control-label">Dari</label></td>
								<td>
									<div class="controls">
									  <select data-rel="chosen" name='dari_titik_pasok'>
										<?php
											foreach($titik_pasok_sapi as $row){
												echo "<option value='".$row["id_titik_pasok"]."'>".$row["nama"]."</option>";
											}
										?>
									  </select>
									</div>
								</td>
							</tr>
							<tr>
								<td><label class="control-label">Ke</label></td>
								<td>
									<div class="controls">
									  <select data-rel="chosen" name='ke_titik_pasok'>
										<?php
											foreach($titik_pasok as $row){
												echo "<option value='".$row["id_titik_pasok"]."'>".$row["nama"]."</option>";
											}
										?>
									  </select>
									</div>
								</td>
							</tr>
							<tr>
								<td><label class="control-label">Jumlah</label></td>
								<td><input type="text" name="jumlah"></input></td>
							</tr>
							<tr>
								<td><label class="control-label">Tanggal</label></td>
								<td>
									<input type="text" name="tanggal" class="input-xmedium datepicker"></input>
								</td>
							</tr>
							<tr>
								<td><label class="control-label">Komentar</label></td>
								<td><input type="text" name="komentar"></input></td>
							</tr>
							<tr>
								<td></td>
								<td><input type="submit" class="btn"></input></td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
		</form>
	</div>
	<div id="data-stok" class="row-fluid sortable ui-sortable">
		<div class="box">
			<div class="box-header well" data-original-title>
				<h2>Data Stok Sapi</h2>
				<div class="box-icon">
					<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
					<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
				</div>
			</div>
			<div class="box-content">
				<table class="table table-striped table-bordered bootstrap-datatable datatable">
					<thead>
						<tr>
							<th>Jenis Sapi</th>
							<th>Dari</th>
							<th>Ke</th>
							<th>Jumlah</th>
							<th>Satuan</th>
							<th>Tanggal</th>
							<th>Komentar</th>
							<th>Ditambahkan Oleh</th>
						</tr>
					</thead> 
					<tbody>
					<?php
						foreach($data_stok as $row){
							echo"
								<tr>
									<td>".$row["sapi"]."</td>
									<td>".$row["dari"]."</td>
									<td>".$row["ke"]."</td>
									<td>".$row["jumlah"]."</td>
									<td>".$row["satuan"]."</td>
									<td>".$row["tanggal_kejadian"]."</td>
									<td>".$row["komentar"]."</td>
									<td>".$row["user"]."</td>
								</tr>
							";
						}
					?>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>